﻿import request from '/@/utils/request';
enum Api {
  AddIotProduct = '/api/iotProduct/add',
  DeleteIotProduct = '/api/iotProduct/delete',
  UpdateIotProduct = '/api/iotProduct/update',
  PageIotProduct = '/api/iotProduct/page',
  DetailIotProduct = '/api/iotProduct/detail',
}

// 增加产品
export const addIotProduct = (params?: any) =>
	request({
		url: Api.AddIotProduct,
		method: 'post',
		data: params,
	});

// 删除产品
export const deleteIotProduct = (params?: any) => 
	request({
			url: Api.DeleteIotProduct,
			method: 'post',
			data: params,
		});

// 编辑产品
export const updateIotProduct = (params?: any) => 
	request({
			url: Api.UpdateIotProduct,
			method: 'post',
			data: params,
		});

// 分页查询产品
export const pageIotProduct = (params?: any) => 
	request({
			url: Api.PageIotProduct,
			method: 'post',
			data: params,
		});

// 详情产品
export const detailIotProduct = (id: any) => 
	request({
			url: Api.DetailIotProduct,
			method: 'get',
			data: { id },
		});


